package me.itsoo.elasticbatis.mapping;

import lombok.Builder;
import lombok.Getter;
import org.elasticsearch.client.RestHighLevelClient;

/**
 * Environment
 *
 * @author zhangxy4
 * @version 0.0.1
 * @since 2025/4/7
 */
@Getter
@Builder
public class Environment {

    private final String id;
    private final RestHighLevelClient dataSource;

    public Environment(String id, RestHighLevelClient dataSource) {
        if (id == null) {
            throw new IllegalArgumentException("Parameter 'id' must not be null");
        }
        this.id = id;
        if (dataSource == null) {
            throw new IllegalArgumentException("Parameter 'dataSource' must not be null");
        }
        this.dataSource = dataSource;
    }
}
